<pageactions></pageactions>
<div class="billContainer">
    <form name="stockinScript" ng-keydown="doKeydown($event);" novalidate>
        <div class="billHeader">
            <div class="row">
                <div class="col-sm-3">
                    <label>{{'lang.subject'|lang}}: </label>
                    <input type="text" class="input-medium" ng-model="formMetaData.subject" required />
                </div>
                <div class="col-sm-4">
                    <label>{{'lang.dateline'|lang}}: </label>
                    <span class="input-icon input-icon-right">
                        <input type="datetime-local" placeholder="yyyy-mm-dd HH:mm" name="dateline" ng-model="formMetaData.dateline" />
                        <i class="icon-time gray"></i>
                    </span>
                </div>
                <div class="col-sm-2">
                    <inputfield config="typeSelectOpts"></inputfield>
                </div>
                <div class="col-sm-3 align-right" ng-show="formMetaData.bill_id">
                    <span>{{'lang.billId'|lang}}:</span>
                    <span ng-bind="formMetaData.bill_id"></span>
                </div>
            </div>
        </div>
        <div class="billBody">
            <bill config="config"></bill>
        </div>
        <div class="billFooter clearfix">
            <div class="row form-group">
                <label class="col-sm-1 text-right" ng-bind="'lang.memo'|lang"></label>
                <div class="col-sm-11">
                    <input type="text" ng-model="formMetaData.memo" class="width-100" />
                </div>
            </div>
            <div class="row">
                <div class="col-sm-1 text-right" ng-bind="'lang.sponsor'|lang"></div>
                <div class="col-sm-8">
                    <span ng-bind="$parent.userInfo.truename"></span>
                </div>
                <div class="col-sm-3 text-right">
                    <button type="button" class="btn btn-sm btn-primary" ng-click="doSubmit();" ng-bind="'lang.actions.submit'|lang"></button>
                    <button type="button" class="btn btn-sm" onclick="history.go(-1);" ng-bind="'lang.actions.return'|lang"></button>
                </div>
            </div>

            <div class="row" ng-show="formMetaData.relatedItems.length>0">
                <hr class="hr-10" />
                <div class="col-xs-12">
                    <h4 ng-bind="'lang.relatedItemAndBill'|lang"></h4>
                    <ul class="list-unstyled spaced">
                        <li class="col-sm-4" ng-repeat="item in formMetaData.relatedItems" title="">
                            <i class="icon icon-{{item.icon}}"></i>
                            {{item.type|lang}}
                            <a ng-click="$root.goPage(item.link+item.id)">
                                #{{item.bill_id}}
                            </a>
                            <span class="grey">{{item.processes.status_text}}</span>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>